package com.klod.news.ext

import android.content.Context
import android.widget.Toast
import androidx.compose.ui.platform.LocalContext
import org.koin.core.annotation.Single
import org.koin.java.KoinJavaComponent.inject

@Single
class ToastExt(private val context: Context){

    fun showToast(msg: String){
        Toast.makeText(context,msg,Toast.LENGTH_SHORT).show()
    }

}

fun String.showToast(){
   val toastExt : ToastExt by inject(ToastExt::class.java)

    toastExt.showToast(this)
}